INSERT INTO [anton].[dbo].[history]
           ([record_desc]
           ,[record_id]
           ,[record_date]
           ,[record_goods_id]
           ,[record_amount]
           ,[record_income_flag]
           ,[record_name])
     VALUES
           ('fkfkfkfkfkfkf'
           ,  if not exists select top record_id from history begin end
           ,getdate()
           ,1
           ,23
           ,1      
            ,1)
GO


